Integrand size = 14, antiderivative size = 83 \[ \int e^{x^2} \cos \left (a+c x^2\right ) \, dx=\frac {e^{-i a} \sqrt {\pi } \text {erfi}\left (\sqrt {1-i c} x\right )}{4 \sqrt {1-i c}}+\frac {e^{i a} \sqrt {\pi } \text {erfi}\left (\sqrt {1+i c} x\right )}{4 \sqrt {1+i c}} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4561, 2235} \[ \int e^{x^2} \cos \left (a+c x^2\right ) \, dx=\frac {\sqrt {\pi } e^{-i a} \text {erfi}\left (\sqrt {1-i c} x\right )}{4 \sqrt {1-i c}}+\frac {\sqrt {\pi } e^{i a} \text {erfi}\left (\sqrt {1+i c} x\right )}{4 \sqrt {1+i c}} \]
[In]
[Out]
Rule 2235
Rule 4561
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{2} e^{-i a+(1-i c) x^2}+\frac {1}{2} e^{i a+(1+i c) x^2}\right ) \, dx \\ & = \frac {1}{2} \int e^{-i a+(1-i c) x^2} \, dx+\frac {1}{2} \int e^{i a+(1+i c) x^2} \, dx \\ & = \frac {e^{-i a} \sqrt {\pi } \text {erfi}\left (\sqrt {1-i c} x\right )}{4 \sqrt {1-i c}}+\frac {e^{i a} \sqrt {\pi } \text {erfi}\left (\sqrt {1+i c} x\right )}{4 \sqrt {1+i c}} \\ \end{align*}
Time = 0.18 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.29 \[ \int e^{x^2} \cos \left (a+c x^2\right ) \, dx=\frac {\sqrt [4]{-1} \sqrt {\pi } \left (-\left ((-i+c) \sqrt {i+c} \text {erfi}\left ((-1)^{3/4} \sqrt {i+c} x\right ) (\cos (a)-i \sin (a))\right )+(1-i c) \sqrt {-i+c} \text {erfi}\left (\sqrt [4]{-1} \sqrt {-i+c} x\right ) (\cos (a)+i \sin (a))\right )}{4 \left (1+c^2\right )} \]
[In]
[Out]
Time = 0.32 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.72
method | result | size |
risch | \(\frac {\sqrt {\pi }\, {\mathrm e}^{-i a} \operatorname {erf}\left (\sqrt {i c -1}\, x \right )}{4 \sqrt {i c -1}}+\frac {\sqrt {\pi }\, {\mathrm e}^{i a} \operatorname {erf}\left (\sqrt {-i c -1}\, x \right )}{4 \sqrt {-i c -1}}\) | \(60\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.01 \[ \int e^{x^2} \cos \left (a+c x^2\right ) \, dx=\frac {\sqrt {\pi } {\left ({\left (-i \, c - 1\right )} \cos \left (a\right ) - {\left (c - i\right )} \sin \left (a\right )\right )} \sqrt {i \, c - 1} \operatorname {erf}\left (\sqrt {i \, c - 1} x\right ) + \sqrt {\pi } {\left ({\left (i \, c - 1\right )} \cos \left (a\right ) - {\left (c + i\right )} \sin \left (a\right )\right )} \sqrt {-i \, c - 1} \operatorname {erf}\left (\sqrt {-i \, c - 1} x\right )}{4 \, {\left (c^{2} + 1\right )}} \]
[In]
[Out]
\[ \int e^{x^2} \cos \left (a+c x^2\right ) \, dx=\int e^{x^{2}} \cos {\left (a + c x^{2} \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 133 vs. \(2 (53) = 106\).
Time = 0.22 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.60 \[ \int e^{x^2} \cos \left (a+c x^2\right ) \, dx=-\frac {\sqrt {\pi } \sqrt {2 \, c^{2} + 2} {\left ({\left (i \, \cos \left (a\right ) + \sin \left (a\right )\right )} \operatorname {erf}\left (\sqrt {i \, c - 1} x\right ) + {\left (-i \, \cos \left (a\right ) + \sin \left (a\right )\right )} \operatorname {erf}\left (\sqrt {-i \, c - 1} x\right )\right )} \sqrt {\sqrt {c^{2} + 1} + 1} - \sqrt {\pi } \sqrt {2 \, c^{2} + 2} {\left ({\left (\cos \left (a\right ) - i \, \sin \left (a\right )\right )} \operatorname {erf}\left (\sqrt {i \, c - 1} x\right ) + {\left (\cos \left (a\right ) + i \, \sin \left (a\right )\right )} \operatorname {erf}\left (\sqrt {-i \, c - 1} x\right )\right )} \sqrt {\sqrt {c^{2} + 1} - 1}}{8 \, {\left (c^{2} + 1\right )}} \]
[In]
[Out]
\[ \int e^{x^2} \cos \left (a+c x^2\right ) \, dx=\int { \cos \left (c x^{2} + a\right ) e^{\left (x^{2}\right )} \,d x } \]
[In]
[Out]
Timed out. \[ \int e^{x^2} \cos \left (a+c x^2\right ) \, dx=\int {\mathrm {e}}^{x^2}\,\cos \left (c\,x^2+a\right ) \,d x \]
[In]
[Out]